package programs;

import java.io.File;

import java.io.IOException;
import java.util.ArrayList;

import algorithms.Bzip2;
import algorithms.CCITTGroup3FacsimileCompression;
import algorithms.CCITTGroup4FacsimileCompression;
import algorithms.GZip;
import algorithms.JBIG2;
import algorithms.LosslessCompressionAlgorithm;
import algorithms.ModifiedHuffman;
import algorithms.XZ;
import algorithms.Zip;

import compare.CompressionRun;
import compare.Config;

public class ExecuteCompression 
{

	public static void main(String[] args) throws IOException, InterruptedException {

		Config cfg = new Config("config/DefaultConfig.cfg");
		ArrayList<LosslessCompressionAlgorithm> algorithms = new ArrayList<LosslessCompressionAlgorithm>();
		ArrayList<File> folders = new ArrayList<File>();
		folders.add(new File(cfg.getString("IrisCodesDir")));
		algorithms.add(new Bzip2());
		algorithms.add(new GZip());
		algorithms.add(new XZ());
		algorithms.add(new Zip());
		algorithms.add(new JBIG2());
		algorithms.add(new CCITTGroup3FacsimileCompression());
		algorithms.add(new CCITTGroup4FacsimileCompression());
		algorithms.add(new ModifiedHuffman());
		CompressionRun run = new CompressionRun(folders, algorithms, new File("config/results_binary_to_bilevel.csv"));
		run.start();
	}

}
